-- GENERATED SPELL FOR [Captain Drenn] --


function spell0_15389(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15389', 683, 1)
end

function spell1_15389(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(26550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15389', 15000, 1)
end

function spell2_15389(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(24317,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15389', 20255, 1)
end

function Sorts_15389(pUnit, Event)
local choix_sorts_15389 = math.random(0, 2)
if choix_sorts_15389 == 0 then
pUnit:RegisterEvent('spell0_15389', 1, 1)
end
if choix_sorts_15389 == 1 then
pUnit:RegisterEvent('spell1_15389', 1, 1)
end
if choix_sorts_15389 == 2 then
pUnit:RegisterEvent('spell2_15389', 1, 1)
end
end

function mob15389_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15389', math.random(1500, 3000), 1)
end

function mob15389_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15389_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15389_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15389, 1, 'mob15389_Action')
RegisterUnitEvent(15389, 2, 'mob15389_Leave')
RegisterUnitEvent(15389, 3, 'mob15389_Kill')
RegisterUnitEvent(15389, 4, 'mob15389_Die')
